package main

import (
	"io"
	"log"
	"strings"
)

func main() {
	reader := strings.NewReader("new reader create")
	p := make([]byte, 4)
	for {
		n, err := reader.Read(p)
		if err != nil {
			if err == io.EOF {
				log.Printf("[end of reader: %d]", n)
				break
			}
		}
		log.Printf("[print bytes:%d content:%v]", n, string(p))
	}
}
